The present invention relates to resource access management, and more particularly to a method and system for managing access to a limited-access resource by multiple clients.
A computerized system may include a resource that allows exclusive access by one client at a time. Access to the resource is typically controlled by a resource access management technique. One resource access management technique is to require clients to poll the resource for availability. Polling requires processing resources of the client, which decreases client processing capability for performing other tasks.
Another resource access management technique involves the implementation of a message queue. A message queue queues up structured messages (requests for access). The managed resource retrieves messages from the message queue and processes the retrieved message one at a time. Messages are typically, but not necessarily, processed by the resource on a first-in-first-out (FIFO) basis.
Message queues allow ordered determination of which client receives access to a resource at a given time. It also frees up the client to perform other tasks without polling the resource. A structured message typically includes a message type field, a message length field, and a variable-length message data field. When a request is added to a message queue, the fields of the message structure are filled in and then the structure is submitted to a queuing function which adds the structure to the queue. The message data field typically includes details of the request, which may include a significant amount of data. Data transfer operations are expensive in terms of system resources and execution time. Furthermore, because queue management functions (such as adding messages to or removing messages from a queue) are implemented at the application level, they are subject to interruption by other system-level or higher priority application tasks, which further serves to increase queue management overhead.
It is always desirable in computer processing systems to reduce the overhead in terms of time and resources of the underlying processor. It would therefore be desirable to have a technique for managing access to a resource that allows exclusive or limited access at a given time and that keeps track of the order of the requests. It would also be desirable that the technique be very fast and utilize few system resources.